import { store } from '@h5app/sheep/store'
import type { AxiosRequestConfig } from 'axios'

export default function request(config: AxiosRequestConfig | any) {
  const user = store.useUserStore()
  const token = user.token
  if (token) {
    config.headers.Authorization = token
  }
  config.headers['Token-Type'] = 'WECHAT'
  return config
}
